package me.like.diandian.api;


import java.lang.ref.SoftReference;

import me.like.diandian.base.BaseContract;

/**
 * Created by sanji on 16/3/3.
 */
public class SimpleErrorVerify implements ErrorVerify {

    private SoftReference<BaseContract.BaseView> mContext;

    public SimpleErrorVerify(BaseContract.BaseView  mContext) {
        this.mContext = new SoftReference<>(mContext);
    }

    @Override
    public void call(int code, String desc) {
        if (mContext!=null && mContext.get()!=null) {
            ( mContext.get()).showError(desc);
        }
    }
}
